#!/usr/bin/perl

#The sort will work up to 9 at the moment

$test = "error";
$value = "";   # initializing value

open($file, "<", "HostingPackage.txt") or die(exit(4));

while ($line = <$file>) {   # checks all lines in file

        if($line =~ /^\s*([\d]+)\s*/ ) {
			$value = $value.$1.",";
			$test = $1;
	}
}

if ($test =~ /error/) { print "ErrorCode626"; }
else {
	$value =~ s/,$//;   #Remove last comma
	print $value."\n";
}

close $file;

exit(5);
